import request from '@/utils/request'

// 查询辖区列表
export function listJurisdiction(query) {
  return request({
    url: '/manage/jurisdiction/list',
    method: 'get',
    params: query
  })
}

// 查询辖区详细
export function getJurisdiction(id) {
  return request({
    url: '/manage/jurisdiction/' + id,
    method: 'get'
  })
}

// 新增辖区
export function addJurisdiction(data) {
  return request({
    url: '/manage/jurisdiction',
    method: 'post',
    data: data
  })
}

// 修改辖区
export function updateJurisdiction(data) {
  return request({
    url: '/manage/jurisdiction',
    method: 'put',
    data: data
  })
}

// 删除辖区
export function delJurisdiction(id) {
  return request({
    url: '/manage/jurisdiction/' + id,
    method: 'delete'
  })
}

// 导出辖区
export function exportJurisdiction(query) {
  return request({
    url: '/manage/jurisdiction/export',
    method: 'get',
    params: query
  })
}